import request from '@/utils/request'

//获取目录信息列表
export const getDirectoryListApi = (params) => {
    return request({
        url: '/admin/subject/directory',
        params
    })
}
//获取学科列表
export const getDirectorytreeApi = () => {
    return request({
        url: '/admin/subject/tree',
    })
}
//切换隐藏显示
export const changeShowApi = (data) => {
    return request({
        url: '/admin/subject/directory/' + data.id,
        method: 'put',
        data
    })
}
//添加目录
export const addDirectoryApi = (data) => {
    return request({
        url: '/admin/subject/directory',
        method: 'post',
        data
    })
}
//删除目录
export const delDirectoryApi = (id) => {
    return request({
        url: '/admin/subject/directory/' + id,
        method: 'delete'
    })
}
//修改咯
export const editDirectoryApi = (data) => {
    return request({
        url: '/admin/subject/directory/' + data.id,
        method: 'put',
        data
    })
}